home *** CD-ROM | disk | FTP | other *** search
/ Technotools / Technotools (Chestnut CD-ROM)(1993).ISO / lantools / blueprnt / bpremote.asm < prev    next >
Assembly Source File  |  1989-09-27  |  2KB  |  52 lines

  1. ;************************************************************
  2. ;* BP-LAN Remote Process Exec. (BPREMOTE.ASM, BPREMOTE.COM) *
  3. ;* by Craig Chaiken                                         *
  4. ;* September 20, 1989                                       *
  5. ;*                                                          *
  6. ;* Function: Executes DOS Command Line as Remote Process    *
  7. ;*           on Network Hub Computer.                       *
  8. ;* Command Format:                                          *
  9. ;*           BPREMOTE /socket_num /dos_command              *
  10. ;************************************************************
  11.  
  12. codeseg segment byte
  13.         assume  cs:codeseg,ds:codeseg,es:codeseg
  14.         org     100h
  15. start:  jmp     remote
  16. ;
  17. remote_buffer   db      256 dup (?)
  18. socket_num      db      0
  19. packet_length   dw      0
  20.  
  21.         include bpbioshd.mod
  22.         include misc.mod
  23.  
  24. remote  proc    near                            ;Exit if no Parameters
  25.         mov     al,cs:[80h]
  26.         or      al,al
  27.         jnz     remot1
  28.         ret
  29. remot1: mov     si,81h
  30.         call    get_opt
  31.         mov     socket_num,cl           ;get socket_num from command line
  32.         call    wslash
  33.         lea     di,remote_buffer[1]
  34.         mov     word ptr packet_length,0
  35. remot2: mov     al,[si]
  36.         inc     si
  37.         cmp     al,'"'
  38.         jz      remot2
  39.         mov     [di],al
  40.         inc     di
  41.         inc     packet_length
  42.         cmp     al,13
  43.         jnz     remot2
  44.         inc     packet_length
  45.         mov     byte ptr remote_buffer,'E'
  46.         put_packet socket_num,packet_length,offset remote_buffer
  47.         int     20h
  48. remote  endp
  49.  
  50. codeseg ends
  51.         end     start
  52.